// HSS.Forms.DirtyEventArgs.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       DirtyEventArgs.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Forms
{
	#region Using Directives
	using System;
	#endregion

	/// <summary>
	/// Dirty Event Arguments for Dirty Event
	/// </summary>
	public class DirtyEventArgs : EventArgs
	{
		/// <summary>
		/// ctor
		/// </summary>
		public DirtyEventArgs() { }
		/// <summary>
		/// ctor
		/// </summary>
		/// <param name="IsDirty">Indicates form sender is dirty</param>
		public DirtyEventArgs(bool IsDirty)
		{
			_isDirty = IsDirty;
		}
		/// <summary>
		/// ctor
		/// </summary>
		/// <param name="IsDirty">Indicates form sender is dirty</param>
		/// <param name="IsEditing">Indicates user has begun editing fields</param>
		public DirtyEventArgs(bool IsDirty, bool IsEditing)
		{
			_isDirty = IsDirty;
			_isEditing = IsEditing;
		}
		/// <summary>
		/// ctor
		/// </summary>
		/// <param name="IsDirty">Indicates form sender is dirty</param>
		/// <param name="IsEditing">Indicates user has begun editing fields</param>
		/// <param name="State">State object</param>
		public DirtyEventArgs(bool IsDirty, bool IsEditing, object State)
		{
			_isDirty = IsDirty;
			_isEditing = IsEditing;
			_state = State;
		}
		/// <summary>
		/// Indicates is form sender is dirty
		/// </summary>
		public bool IsDirty
		{
			get { return _isDirty; }
		} bool _isDirty = true;
		/// <summary>
		/// Indicates user has begun editing fields
		/// </summary>
		/// <remarks>This is useful for determining the difference between when a form 
		/// is set to a dirty state to begin editing and when the user has actually
		/// made a change.</remarks>
		public bool IsEditing
		{
			get { return _isEditing; }
		} bool _isEditing = false;
		/// <summary>
		/// State object
		/// </summary>
		public object State
		{
			get { return _state; }
		} object _state = null;
	}
}